<template>
  <div>
    <p>GrandSon---{{ count }}</p>
    <button @click="send">传值给顶级组件</button>
  </div>
</template>

<script>
export default {
  inject: ['count', 'getValue'],
  mounted () {
    console.log('---GrandSon---', this.count)
  },
  methods: {
    send () {
      this.getValue(['鸡腿', '猪脚饭'])
    }
  }
}
</script>
